package com.itheima.example;

import java.io.*;

public class Example09 {
    public static void main(String[] args) throws Exception {
        FileInputStream input = new FileInputStream("test.txt");
        InputStreamReader streamReader = new InputStreamReader(input);
        BufferedReader bufferReader = new BufferedReader(streamReader);
        FileOutputStream output = new FileOutputStream("dest2.txt");
        OutputStreamWriter streamWriter = new OutputStreamWriter(output);
        BufferedWriter bufferWriter = new BufferedWriter(streamWriter);
        String line = null;
        while ((line = bufferReader.readLine()) != null) {
            bufferWriter.write(line);
        }
        bufferReader.close();
        bufferWriter.close();
    }
}
